Integrand size = 21, antiderivative size = 166 \[ \int \frac {\csc (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {\sqrt {b} \left (15 a^2-20 a b+8 b^2\right ) \arctan \left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{8 a^3 (a-b)^{5/2} f}-\frac {\text {arctanh}(\cos (e+f x))}{a^3 f}-\frac {b \sec (e+f x)}{4 a (a-b) f \left (a-b+b \sec ^2(e+f x)\right )^2}-\frac {(7 a-4 b) b \sec (e+f x)}{8 a^2 (a-b)^2 f \left (a-b+b \sec ^2(e+f x)\right )} \]
[Out]
Time = 0.28 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3745, 425, 541, 536, 213, 211} \[ \int \frac {\csc (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {\text {arctanh}(\cos (e+f x))}{a^3 f}-\frac {b (7 a-4 b) \sec (e+f x)}{8 a^2 f (a-b)^2 \left (a+b \sec ^2(e+f x)-b\right )}-\frac {\sqrt {b} \left (15 a^2-20 a b+8 b^2\right ) \arctan \left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{8 a^3 f (a-b)^{5/2}}-\frac {b \sec (e+f x)}{4 a f (a-b) \left (a+b \sec ^2(e+f x)-b\right )^2} \]
[In]
[Out]
Rule 211
Rule 213
Rule 425
Rule 536
Rule 541
Rule 3745
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{\left (-1+x^2\right ) \left (a-b+b x^2\right )^3} \, dx,x,\sec (e+f x)\right )}{f} \\ & = -\frac {b \sec (e+f x)}{4 a (a-b) f \left (a-b+b \sec ^2(e+f x)\right )^2}+\frac {\text {Subst}\left (\int \frac {4 a-b-3 b x^2}{\left (-1+x^2\right ) \left (a-b+b x^2\right )^2} \, dx,x,\sec (e+f x)\right )}{4 a (a-b) f} \\ & = -\frac {b \sec (e+f x)}{4 a (a-b) f \left (a-b+b \sec ^2(e+f x)\right )^2}-\frac {(7 a-4 b) b \sec (e+f x)}{8 a^2 (a-b)^2 f \left (a-b+b \sec ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {8 a^2-9 a b+4 b^2-(7 a-4 b) b x^2}{\left (-1+x^2\right ) \left (a-b+b x^2\right )} \, dx,x,\sec (e+f x)\right )}{8 a^2 (a-b)^2 f} \\ & = -\frac {b \sec (e+f x)}{4 a (a-b) f \left (a-b+b \sec ^2(e+f x)\right )^2}-\frac {(7 a-4 b) b \sec (e+f x)}{8 a^2 (a-b)^2 f \left (a-b+b \sec ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (e+f x)\right )}{a^3 f}-\frac {\left (b \left (15 a^2-20 a b+8 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{a-b+b x^2} \, dx,x,\sec (e+f x)\right )}{8 a^3 (a-b)^2 f} \\ & = -\frac {\sqrt {b} \left (15 a^2-20 a b+8 b^2\right ) \arctan \left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{8 a^3 (a-b)^{5/2} f}-\frac {\text {arctanh}(\cos (e+f x))}{a^3 f}-\frac {b \sec (e+f x)}{4 a (a-b) f \left (a-b+b \sec ^2(e+f x)\right )^2}-\frac {(7 a-4 b) b \sec (e+f x)}{8 a^2 (a-b)^2 f \left (a-b+b \sec ^2(e+f x)\right )} \\ \end{align*}
Time = 5.26 (sec) , antiderivative size = 247, normalized size of antiderivative = 1.49 \[ \int \frac {\csc (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\frac {\frac {\sqrt {b} \left (15 a^2-20 a b+8 b^2\right ) \arctan \left (\frac {\sqrt {a-b}-\sqrt {a} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )}{(a-b)^{5/2}}+\frac {\sqrt {b} \left (15 a^2-20 a b+8 b^2\right ) \arctan \left (\frac {\sqrt {a-b}+\sqrt {a} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )}{(a-b)^{5/2}}+\frac {8 a^2 b^2 \cos (e+f x)}{(a-b)^2 (a+b+(a-b) \cos (2 (e+f x)))^2}-\frac {2 a (9 a-4 b) b \cos (e+f x)}{(a-b)^2 (a+b+(a-b) \cos (2 (e+f x)))}-8 \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )+8 \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{8 a^3 f} \]
[In]
[Out]
Time = 0.65 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.10
method | result | size |
derivativedivides | \(\frac {\frac {b \left (\frac {-\frac {\left (9 a -4 b \right ) a \cos \left (f x +e \right )^{3}}{8 \left (a -b \right )}-\frac {a b \left (7 a -4 b \right ) \cos \left (f x +e \right )}{8 \left (a^{2}-2 a b +b^{2}\right )}}{\left (a \cos \left (f x +e \right )^{2}-b \cos \left (f x +e \right )^{2}+b \right )^{2}}+\frac {\left (15 a^{2}-20 a b +8 b^{2}\right ) \arctan \left (\frac {\left (a -b \right ) \cos \left (f x +e \right )}{\sqrt {b \left (a -b \right )}}\right )}{8 \left (a^{2}-2 a b +b^{2}\right ) \sqrt {b \left (a -b \right )}}\right )}{a^{3}}-\frac {\ln \left (\cos \left (f x +e \right )+1\right )}{2 a^{3}}+\frac {\ln \left (\cos \left (f x +e \right )-1\right )}{2 a^{3}}}{f}\) | \(183\) |
default | \(\frac {\frac {b \left (\frac {-\frac {\left (9 a -4 b \right ) a \cos \left (f x +e \right )^{3}}{8 \left (a -b \right )}-\frac {a b \left (7 a -4 b \right ) \cos \left (f x +e \right )}{8 \left (a^{2}-2 a b +b^{2}\right )}}{\left (a \cos \left (f x +e \right )^{2}-b \cos \left (f x +e \right )^{2}+b \right )^{2}}+\frac {\left (15 a^{2}-20 a b +8 b^{2}\right ) \arctan \left (\frac {\left (a -b \right ) \cos \left (f x +e \right )}{\sqrt {b \left (a -b \right )}}\right )}{8 \left (a^{2}-2 a b +b^{2}\right ) \sqrt {b \left (a -b \right )}}\right )}{a^{3}}-\frac {\ln \left (\cos \left (f x +e \right )+1\right )}{2 a^{3}}+\frac {\ln \left (\cos \left (f x +e \right )-1\right )}{2 a^{3}}}{f}\) | \(183\) |
risch | \(-\frac {b \left (9 a^{2} {\mathrm e}^{7 i \left (f x +e \right )}-13 a b \,{\mathrm e}^{7 i \left (f x +e \right )}+4 b^{2} {\mathrm e}^{7 i \left (f x +e \right )}+27 a^{2} {\mathrm e}^{5 i \left (f x +e \right )}-11 a b \,{\mathrm e}^{5 i \left (f x +e \right )}-4 b^{2} {\mathrm e}^{5 i \left (f x +e \right )}+27 a^{2} {\mathrm e}^{3 i \left (f x +e \right )}-11 a b \,{\mathrm e}^{3 i \left (f x +e \right )}-4 b^{2} {\mathrm e}^{3 i \left (f x +e \right )}+9 a^{2} {\mathrm e}^{i \left (f x +e \right )}-13 a b \,{\mathrm e}^{i \left (f x +e \right )}+4 b^{2} {\mathrm e}^{i \left (f x +e \right )}\right )}{4 \left (a^{2}-2 a b +b^{2}\right ) \left (-a \,{\mathrm e}^{4 i \left (f x +e \right )}+b \,{\mathrm e}^{4 i \left (f x +e \right )}-2 a \,{\mathrm e}^{2 i \left (f x +e \right )}-2 b \,{\mathrm e}^{2 i \left (f x +e \right )}-a +b \right )^{2} a^{2} f}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{a^{3} f}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{a^{3} f}+\frac {15 i \sqrt {b \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {b \left (a -b \right )}\, {\mathrm e}^{i \left (f x +e \right )}}{a -b}+1\right )}{16 \left (a -b \right )^{3} f a}-\frac {5 i \sqrt {b \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {b \left (a -b \right )}\, {\mathrm e}^{i \left (f x +e \right )}}{a -b}+1\right ) b}{4 \left (a -b \right )^{3} f \,a^{2}}+\frac {i \sqrt {b \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {b \left (a -b \right )}\, {\mathrm e}^{i \left (f x +e \right )}}{a -b}+1\right ) b^{2}}{2 \left (a -b \right )^{3} f \,a^{3}}-\frac {15 i \sqrt {b \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {b \left (a -b \right )}\, {\mathrm e}^{i \left (f x +e \right )}}{a -b}+1\right )}{16 \left (a -b \right )^{3} f a}+\frac {5 i \sqrt {b \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {b \left (a -b \right )}\, {\mathrm e}^{i \left (f x +e \right )}}{a -b}+1\right ) b}{4 \left (a -b \right )^{3} f \,a^{2}}-\frac {i \sqrt {b \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {b \left (a -b \right )}\, {\mathrm e}^{i \left (f x +e \right )}}{a -b}+1\right ) b^{2}}{2 \left (a -b \right )^{3} f \,a^{3}}\) | \(680\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 505 vs. \(2 (152) = 304\).
Time = 0.49 (sec) , antiderivative size = 1050, normalized size of antiderivative = 6.33 \[ \int \frac {\csc (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\text {Too large to display} \]
[In]
[Out]
Timed out. \[ \int \frac {\csc (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\text {Timed out} \]
[In]
[Out]
Exception generated. \[ \int \frac {\csc (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 503 vs. \(2 (152) = 304\).
Time = 0.83 (sec) , antiderivative size = 503, normalized size of antiderivative = 3.03 \[ \int \frac {\csc (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {\frac {{\left (15 \, a^{2} b - 20 \, a b^{2} + 8 \, b^{3}\right )} \arctan \left (-\frac {a \cos \left (f x + e\right ) - b \cos \left (f x + e\right ) - b}{\sqrt {a b - b^{2}} \cos \left (f x + e\right ) + \sqrt {a b - b^{2}}}\right )}{{\left (a^{5} - 2 \, a^{4} b + a^{3} b^{2}\right )} \sqrt {a b - b^{2}}} + \frac {2 \, {\left (9 \, a^{3} b - 6 \, a^{2} b^{2} + \frac {27 \, a^{3} b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {68 \, a^{2} b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {32 \, a b^{3} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {27 \, a^{3} b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {90 \, a^{2} b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {120 \, a b^{3} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {48 \, b^{4} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {9 \, a^{3} b {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac {28 \, a^{2} b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {16 \, a b^{3} {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{{\left (a^{5} - 2 \, a^{4} b + a^{3} b^{2}\right )} {\left (a + \frac {2 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {4 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}^{2}} - \frac {4 \, \log \left (\frac {{\left | -\cos \left (f x + e\right ) + 1 \right |}}{{\left | \cos \left (f x + e\right ) + 1 \right |}}\right )}{a^{3}}}{8 \, f} \]
[In]
[Out]
Time = 15.57 (sec) , antiderivative size = 1844, normalized size of antiderivative = 11.11 \[ \int \frac {\csc (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\text {Too large to display} \]
[In]
[Out]